home *** CD-ROM | disk | FTP | other *** search
Java Source | 1997-07-31 | 916 b | 47 lines |
- /*
- Calendar applet prints the calendar for a month when given
- two parameters: integer month (1 - 12) and integer year (eg. 1997).
- */
- import java.awt.Graphics;
-
- public class Calendar extends java.applet.Applet {
-
- // global variable declarations
- int month, year;
-
- // initialize variables
- public void init() {
-
- // get parameters from HTML file
- Integer i = new Integer(0);
-
- month = i.parseInt(getParameter("month"));
- year = i.parseInt(getParameter("year"));
-
- }
-
- public void paint(Graphics g) {
- // print the calendar
-
- }
- int monthTable(int m, int y)
- {
-
- // compute entry in table of months for current month, year
-
- }
-
- int daysInMonth(int m, int y)
- {
- // compute number of days in a month: don't forget leap year!
-
- }
-
- String getMonthString()
- {
- // return string corresponding to month number
-
-
- }
-
- }